package com.taowan.xunbaozl.morning_speak.design_pattern.day15;

/**
 * com.taowan.xunbaozl.morning_speak.day160310.app
 * Created by diql on 2016/3/10.
 */
public class Context {
    private Status status;
    public Context(Status status) {
        this.status = status;
    }

    public void doFunction() {
        if(status.getValue()) {
            status.function1();
        } else {
            status.function2();
        }
    }
}
